{% block content %}
<h4>請輸入你的帳號與密碼</h4>
<h5 style="color:red" id="id_error">{{ error }}</h5>
<h5 style="color:blue" id="id_info">{{ info }}</h5>
<h5 style="color:green" id="id_success">{{ success }}</h5>
{% comment %}
<h5 id="info"><font color="blue">{{ info }}</font></h5>
{% endcomment %}

<form action="login" name="loginForm" method="post" onsubmit="document.getElementById('id_submit').disabled=1;">{% csrf_token %}
    {{ form.as_p }}
    <input type="submit" id="id_submit" {{ disabled }}
    onclick="
    document.getElementById('id_error').innerHTML=''; 
    document.getElementById('id_info').innerHTML='登入中..';
    " 
    value="登入" />
    {% comment %}
    document.getElementById('id_id').disabled=true;
    document.getElementById('id_passwd').disabled=true;


    <input type="submit" onclick="this.disabled=true; this.value='登入中'" value="登入" />
    {% endcomment %}
</form>

{% endblock %}
